//
//  HNApplyRefundSuccessController.m
//  baidaifu
//
//  Created by 朱传正 on 2017/2/9.
//  Copyright © 2017年 haoniu. All rights reserved.
//

#import "HNApplyRefundSuccessController.h"

@interface HNApplyRefundSuccessController ()

@end

@implementation HNApplyRefundSuccessController


- (IBAction)backMainAction:(UIButton *)sender {
    [self.navigationController popToRootViewControllerAnimated:YES];
}


- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"申请退款";
   self.backMainBtn.backgroundColor =  RGB(85, 206, 84);
    
    //添加点击按钮---添加一个按钮
//    UIButton *clickBtn = [UIButton buttonWithType:UIButtonTypeCustom];
//
//clickBtn.ba
//    clickBtn.frame = CGRectMake(0,0,40,40);
//    [clickBtn addTarget:self action:@selector(backAction:) forControlEvents:UIControlEventTouchUpInside];
//    
//    UIBarButtonItem * leftButtonItem = [[UIBarButtonItem alloc] initWithCustomView:clickBtn];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"xiangyou.png"] style:UIBarButtonItemStyleDone target:self action:@selector(backAction)];
    
}

-(void)backAction{
    int index=(int)[[self.navigationController viewControllers]indexOfObject:self];
    [self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:index-2]animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
